<?php


namespace app\common\model;


class System extends Basemodel
{

    /**
     * 显示所有信息
     * @param string $type
     */
    public function getnoteall($type = '')
    {
        $datas = $data = [];
        if (!empty($type)) {
            $datas['type'] = $type;
            $datas['lang'] = cookie('think_var');
        }
        return $system = $this->where($datas)->column('value,type','title');
        exit();
        //旧版
        $system = $this->where($datas)->select();
        foreach ($system as $key => $value) {
            $data[$value['title']] = ['value' => $value['value'], 'miaoshu' => $value['miaoshu'], 'type' => $value['type']];
        }
        return $data;
    }

    /**
     * 显示后台所有信息
     * @param string $type
     */
    public function getadminnoteall($type = '')
    {
        $datas = $data = [];
        if (!empty($type)) {
            $datas['type'] = $type;
            $datas['lang'] = cookie('think_var_admin');
        }
       return $system = $this->where($datas)->column('value,type','title');
        exit();
        //旧版
        $system = $this->where($datas)->select();
        foreach ($system as $key => $value) {
            $data[$value['title']] = ['value' => $value['value'], 'miaoshu' => $value['miaoshu'], 'type' => $value['type']];
        }

        return $data;
    }

}